<template>
  <el-breadcrumb separator="/">
    <el-breadcrumb-item
      v-for="(item, index) in pathList"
      :key="index"
      :to="item.path"
      >{{ item.title }}</el-breadcrumb-item
    >
  </el-breadcrumb>
</template>

<script>
export default {
  name: "Breadcrumb",
  computed: {
    pathList() {
      return this.$route.matched.map((val) => {
        return {
          path: val.path,
          title: val.meta.title,
        };
      });
    },
  },
};
</script>

<style>
</style>